export const analyzeEmoji = (cont) => {
  //编译表情替换成图片展示出来
  var pattern1 = /\[[\u4e00-\u9fa5]+\]/g;
  var pattern2 = /\[[\u4e00-\u9fa5]+\]/;
  var content = cont.match(pattern1);
  var str = cont;
  if (content) {
    for (var i = 0; i < content.length; i++) {
      for (var j = 0; j < this.OwOlist.length; j++) {
        if ('[' + this.OwOlist[j].title + ']' == content[i]) {
          var src = this.OwOlist[j].url;
          break;
        }
      }
      str = str.replace(pattern2, '<img src="static/img/emot/image/' + src + '"/>');
    }
  }
  return str;
};

export const isEmptyObject = (obj) => {
  return Object.keys(obj).length === 0 && obj.constructor === Object;
};
